package ooday01homework;

import java.util.SortedMap;

public class Car {
    /*
    String brand ;
    String color;
    double price;

    Car() {

    }

    Car(String brand, String color, double price) {
        this.brand=brand;
        this.color=color;
        this.price=price;
    }

    void start() {
        System.out.println("品牌为" + brand + "，颜色为" + color +
                "，价格为" + price + "的汽车启动了！");
    }

    void run() {
        System.out.println("品牌为" + brand + "，颜色为" + color +
                "，价格为" + price + "的汽车开始跑了！");
    }

    void stop() {
        System.out.println("品牌为" + brand + "，颜色为" + color +
                "，价格为" + price + "的汽车停止了！");

    }

     */
    String brand;
    String color;
    double price;

    Car() {

    }

    Car(String brand, String color, double price) {
        this.brand =brand;
        this.color = color;
        this.price = price;
    }

    void start() {
        System.out.println(brand+"牌子"+color+"颜色"+price+"价格" +
                "的车启动了");
    }

    void run() {
        System.out.println(brand+"牌子"+color+"颜色"+price+"价格" +
                "的车开始跑了");
    }

    void stop() {
        System.out.println(brand+"牌子"+color+"颜色"+price+"价格" +
                "的车停止了");
    }

}
